package com.example.jenkinsdemo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class OneController {

    @Value("#{${data.map}}")
    private Map<String,String> tttmap;

    @Value("#{'${data.list}'.split(',')}")
    private List<String> list;

    @RequestMapping("/api/one")
    public String one() {

        tttmap.forEach((x,y)->{
            System.out.println("{" + x + "}:{" + y + "}");
        });
        for (String s : list) {
            System.out.println(s);
        }
        return "hello one controller";
    }
}
